package main

func move(n int, a, b, c string) {
	if n == 1 {
		println(a, "--->", c)
		return
	}
	move(n-1, a, c, b)
	move(1, a, b, c)
	move(n-1, b, a, c)
}
func main() {
	move(4, "A", "B", "C")
}
